﻿<phone:PhoneApplicationPage
    x:Class="BudgetManager.Categories"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Key="categoriesItemTemplate">
            <StackPanel>
                <TextBlock Text="{Binding Path=.}" Style="{StaticResource PhoneTextLargeStyle}"></TextBlock>
            </StackPanel>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True">
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <Grid x:Name="LayoutRoot" Background="Transparent">

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Margin="12,0,12,0">
            <phone:Pivot Title="MY BUDGET MANAGER">
                <!--Pivot item one-->
                <phone:PivotItem Header="{Binding Path=LocalizedResources.Categories, Source={StaticResource LocalizedStrings}}">
                    <ScrollViewer>
                        <StackPanel>
                            <TextBlock Text="{Binding Path=LocalizedResources.CategoryName, Source={StaticResource LocalizedStrings}}"></TextBlock>
                            <StackPanel Orientation="Horizontal">
                                <TextBox Name="txtNewCategory" Width="300" TextChanged="onTextChanged"/>
                                <Button Content="{Binding Path=LocalizedResources.Add, Source={StaticResource LocalizedStrings}}" Tap="addCategory" Width="100" Name="btnAdd" IsEnabled="False"></Button>
                            </StackPanel>
                            <TextBlock Visibility="Collapsed" Name="txtCategoriesList" Style="{StaticResource PhoneTextAccentStyle}" Text="{Binding Path=LocalizedResources.AvailableCategoriesText, Source={StaticResource LocalizedStrings}}" Margin="5"></TextBlock>
                            <toolkit:LongListMultiSelector  x:Name="categoriesList" LayoutMode="List" SelectionChanged="categoriesSelectionChanged" ItemTemplate="{StaticResource categoriesItemTemplate}">
                            </toolkit:LongListMultiSelector >
                        </StackPanel>
                    </ScrollViewer>
                </phone:PivotItem>
            </phone:Pivot>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>